<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>图片放大</title>
    <style>
        .box{
            width: 100px;
            height: 100px;
            background-color: rgb(170, 228, 255);
            transition: 2s;
            margin: 100px auto;
        }
        .box:hover{
            transform: scale(2);
        }
        .img-wrapper{
            margin: 100px auto;
            width: 200px;
            height: 200px;
            overflow: hidden;
        }
        img{
            transition: .8s;
        }
        .img-wrapper:hover img{
            transform: scale(1.2);
        }
    </style>
</head>
<body>
    <div class="box"></div>
    <div class="img-wrapper">
        <img src="./index.png" alt="">
    </div>
</body>
</html>